import request from '@/utils/newRequest'

// 获取双选会列表
export function getDoubleChooses(params) {
  return request({
    url: '/double-chooses',
    method: 'get',
    params
  })
}
// 获取省市区
export function getAreas(params) {
  return request({
    url: '/areas',
    method: 'get',
    params
  })
}
// 添加双选会
export function addNewDC(params) {
  return request({
    url: '/double-chooses',
    method: 'post',
    params
  })
}
// 删除双选会
export function deleteDoubleCho(id) {
  return request({
    url: '/double-chooses/' + id,
    method: 'delete'
  })
}
// 查看参加双选会企业列表
export function getDChoCompany(id, params) {
  return request({
    url: `/double-chooses/${id}/companies`,
    method: 'get',
    params
  })
}
// 审核参加双选会企业
export function auditDChoCompany(id, cid, status, params) {
  return request({
    url: `/double-chooses/${id}/companies/${cid}/audit/${status}`,
    method: 'patch',
    params
  })
}
// 获取双选会详情
export function getDoubleChoDetail(id) {
  return request({
    url: '/double-chooses/' + id,
    method: 'get'
  })
}
// 编辑双选会
export function modifyDChoCompany(id, params) {
  return request({
    url: '/double-chooses/' + id,
    method: 'put',
    params
  })
}
